package com.nihao001.parse.config;

import java.util.HashMap;
import java.util.Map;

public class ResultConfig {
	private String classFullName = null;
	private String selector = null;
	private String childClass = null;

	private Map<String, Result> resultMap = new HashMap<String, Result>();

	public String getSelector() {
		return selector;
	}

	public void setSelector(String selector) {
		this.selector = selector;
	}

	public String getClassFullName() {
		return classFullName;
	}

	public void setClassFullName(String classFullName) {
		this.classFullName = classFullName;
	}

	public String getChildClass() {
		return childClass;
	}

	public void setChildClass(String childClass) {
		this.childClass = childClass;
	}

	public void addResult(Result result) {
		if (resultMap.containsKey(result.getPropertyName())) {
			throw new IllegalArgumentException(
					"parameter is duplicate.  propertyName="
							+ result.getPropertyName());
		} else {
			resultMap.put(result.getPropertyName(), result);
		}
	}

	public Map<String, Result> getResultMap() {
		return resultMap;
	}

}
